<% layout('diylayout') %><!--加载全局布局文件-->

<div class='' style='background: #EEE;' ng-controller="ConfirmCtrl">
    <div data-ng-init="load(<%= total %>)"></div>
    <form>
        <div class='am-margin-top-0 am-padding-xs am-padding-bottom-lg' style='background: #FFF;height: 44px;' ng-click="getAllAddr()">
            <div class='' >
            <span style='font-size: 15px;'>
                <span ng-bind="sendAddr.storeName" style="color: red;"></span>
            </span>
            <span style='font-size: 18px;color:#AAA;float: right;'>
                <button type="button" class="am-btn am-btn-warning am-radius" style="border-bottom-width: 1px;">选择自提点</button>
            </span>
                <input type="hidden" ng-model="addrId" style="width: 500px;" />
                <input type="hidden" ng-model="storeName" style="width: 500px;" />
            </div>
        </div>

        <div class="am-form-group am-form-icon " style="top: 10px;">
            <input  type="text" class="scor-bg-F8F8F8 am-form-field  scor-text-indent" placeholder="提货人" ng-model="toName">
        </div>

        <div class="am-form-group am-form-icon  ">
            <input  type="text" class="scor-bg-F8F8F8 am-form-field  scor-text-indent" placeholder="提货人电话" ng-model="toPhone">
        </div>

        <div class='am-margin-top-sm am-padding-sm' style='background: #FFF;'>
            <div class='' >
            <span style='font-size: 15px;'>
                支付方式
                <hr data-am-widget="divider" style="" class="am-divider am-divider-default am-margin-0 " />
            </span>
            </div>
            <div class='' >
            <span style='font-size: 15px;'>

                <p class="am-margin-vertical-xs">
                    <input type="radio" name="radioPay" style="position: relative;" value="hdfk_pay" checked>&nbsp;<span style="position: absolute;margin-top: 0.1em;">门店付款</span>&nbsp;&nbsp;&nbsp;
                    <input type="radio" name="radioPay" style="position: relative;margin-left: 4em;" value="wx_pay" >&nbsp;<span style="position: absolute;margin-top: 0.1em;">微信支付</span>&nbsp;&nbsp;&nbsp;
                </p>

                <hr data-am-widget="divider" style="" class="am-divider am-divider-dotted am-margin-0" />
            </span>
            </div>
        </div>

        <div class='am-margin-top-sm am-padding-xs' style='background: #FFF;'>
            <div data-am-widget="list_news" class="am-list-news am-list-news-default" >
                <div class="am-list-news-bd">
                    <ul class="am-list">
                        <% cart.forEach(function(c){ %>
                        <li class="am-g am-list-item-desced am-padding-vertical-0 am-list-item-thumbed am-list-item-thumb-bottom-left" style="height: 80px;">
                            <div class="am-u-sm-3 am-list-thumb" style="max-height: none !important;">
                                <a href="#" class="">
                                    <img src="<%= c.img%>" style="width:78px;height:78px;" />
                                </a>
                            </div>
                            <div class=" am-u-sm-9  am-list-main">
                                <div class="am-list-item-text" style="margin-top:1rem !important;">
                                    &nbsp;<%= c.pname %>
                                </div>
                                <div class="am-list-item-text color-DE0000 font-size-24p font-weight-700">
                                    &nbsp;<span style="color: red;">¥ <%= c.price%></span> * <%= c.size%>
                                </div>

                            </div>
                            <div class=" am-u-sm-2  am-list-main text-center">
                            </div>
                        </li>
                        <%});%>
                    </ul>
                </div>
            </div>
        </div>


        <div class='am-margin-top-sm am-padding-sm more-service' style='background: #FFF;'>
            <div class='' >
            <span style='font-size: 15px;color: red'>

                <input type="hidden" ng-model="total" />

            </span>
            </div>
        </div>

        <div class="am-modal am-modal-prompt scor-left-0 scor-bg-F8F8F8 "tabindex="-1" id="form-alert">
            <div class="am-modal-dialog scor-width-height-100 am-margin-0 scor-scroll">
                <span data-am-modal-close  class="am-close am-close-alt am-close-spin am-icon-times am-align-right am-margin-right-sm am-margin-top-xs"></span>
                <div class="scor-height-40"></div>
                <div class="am-modal-hd scor-color-gr-font scor-font-size-22 scor-font-weight-700 am-padding-top-lg" ng-bind="formTitle"></div>
                <div ng-repeat="addr in data" class="am-margin-sm scor-border-radius-5 scor-border-bbb scor-border-set-{{addr.isDefault}}">
                    <div ng-click="setSendAddr($index,addr)" class="am-text-left">
                        <p class="am-margin-sm">
                            <span class="scor-color-red scor-font-weight-700">门店：</span>
                            <span ng-bind="addr.storeName"></span>
                        </p>
                        <p class="am-margin-sm am-margin-top-0">
                            <span class="scor-color-red scor-font-weight-700 ">地址：</span>
                            <span ng-bind="addr.storeAddress"></span>
                        </p>
                    </div>
                </div>
            </div>
        </div>

        <div data-am-widget="navbar" class="am-navbar am-cf am-navbar-default " id="navbar" >
            <div class="am-navbar-nav am-cf am-avg-sm-4" style="background: #EEEEEE !important;">
                <div class="am-g am-padding-0 am-margin-0">
                    <div class="am-u-sm-3 am-padding-0 am-margin-0">
                        <span style="color: red;" >共:<span ng-bind="total"></span></span>
                    </div>
                    <div class="am-u-sm-3">
                        <button type="button" id="qr" name="qr" class="am-btn am-btn-warning am-radius" ng-click="addOrder($index)">确认</button>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>
<% block('footer').append('<script src="/extra/diy/app.js"></script>') %>
<% block('footer').append('<script src="/extra/diy/service.js"></script>') %>
<% block('footer').append('<script src="/extra/diy/confirm.js"></script>') %>